<script lang="ts" setup>
import { routes } from "@/router";

const poc = routes.find((r) => r.name === "poc");
</script>

<template>
  <router-view />
  <div class="layout-poc">
    <router-link v-for="r in poc?.children" :key="r.name" :to="{ name: r.name }">
      <IconSvg v-if="r.meta?.icon" :name="r.meta.icon + ''" />
      <span>&nbsp;{{ r.meta?.title || "未知路由" }}</span>
    </router-link>
  </div>
</template>

<style lang="scss" scoped>
.layout-poc {
  display: flex;
  position: fixed;
  top: 10px;
  right: 10px;
  gap: 15px;

  a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;

    span {
      background-image: linear-gradient(#e7bf80, #a36506);
      -webkit-background-clip: text;
      -moz-background-clip: text;
      color: transparent;
      text-decoration: none;
    }
  }
}
</style>
